<?php
session_start();
if(!isset($_SESSION['id'])){
    header('Location: login.php');
    exit;
}
?>
<!DOCTYPE html>
<html lang="en" class="no-js">
	<head>
		<meta charset="UTF-8" />
		<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> 
		<meta name="viewport" content="width=device-width, initial-scale=1.0"> 
		<title>::: SOS UNITAU -- Sistema de ordem de serviço</title>
		
		<link rel="shortcut icon" href="img/logo.jpg">
		<link rel="stylesheet" type="text/css" href="css/normalize.css" />
		<link rel="stylesheet" type="text/css" href="css/demo.css" />
		<link rel="stylesheet" type="text/css" href="css/icons.css" />
		<link rel="stylesheet" type="text/css" href="css/style2.css" />
        <link rel="stylesheet" type="text/css" href="css/StylePage.css" />
        <link rel="stylesheet" type="text/css" href="css/default.css" />
        <link rel="stylesheet" type="text/css" href="css/component.css" />
        <script type="text/javascript" src="js/jquery1.6.min.js"></script>
        <script src="js/jquery.maskedinput-1.3.min.js"></script>
         
    <script>
        $(document).ready(function () {
            $('#novaFuncao').click(function () {

                var dep = $('#txtFuncao').val().trim();

                if (dep == "") {
                    alert('Preencha a nova Departamento!');
                } else {

                    $.post("../funcoes/novo_departamento.php", {dep: dep}, function (retorno) {

                        alert(retorno);
                        location.reload();
                    }).fail(function () {
                        alert("erro");
                    });
                }
            });
        });
    </script>
        
        
</head>
<body style="overflow-x: hidden">
    <div class="loading"></div>
        <div class="container"> <!-- container -->



            <!-----------------------------CONTEUDO DA PÁGINA --------------------------------->
            <!------- SEGUE ABAIXO ------->



            <div class="barra-superior"></div>
            <div class="sobre-empresa">
                Powered by: Grupo NOP
            </div>

            <!------------- CONTEUDO DE FORMULARIOS---------------------->

            <div class="titulo-page">
                ::: Manipular Departamento
            </div>
        <form name="adicionarFuncao" id="adicionarFuncao" method="post" action="" class="style-form">
            	
                <fieldset style="width:30px;">
                	<legend>Nova Departamento: </legend>
                    <table width="800px" class="table-form">
            	<tr>
            			<td> <label for="txtFuncao"> Adicionar Departamento: </label> </td>
            			<td> <input name="txtFuncao" id="txtFuncao" type="text" required placeholder="Ex: Informática" /></td>
            		</tr>
            
                    
            	</table>
                        <input type="button" value="Gravar" id="novaFuncao" style="display:inline-block; margin-left:50%; margin-top:3%;" class="botao"  /><input type="button" value="Cancelar" style="margin-left:5%;" onClick="javascript:c=window.confirm('Deseja Realmente cancelar?');if(c==true){self.close();}else{}" class="botao" />    
                	</fieldset>

        </form>
            
             <?php include_once("menuLateral.php"); ?>
         </div><!-- FECHA CONTAINER -->
        
         <div class="barra-superior" style="margin-top:193px; height:80px; margin-left:80px"></div>

</body>

<script src="js/classie.js"></script>
<script src="js/borderMenu.js"></script>
</html>